<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>青青藤</title>
<link href="__ADMIN__/css/style_log.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="__ADMIN__/css/style.css">
<link rel="stylesheet" type="text/css" href="__ADMIN__/css/userpanel.css">
<script type="text/javascript" src="__ADMIN__/js/jquery-1.7.2.min.js"></script>
    <style>
        .err{
            color: red;
        }

    </style>
</head>

<body class="login" mycollectionplug="bind">
<div class="login_m">
<div class="login_logo"><img src="__ADMIN__/images/logo.png" width="196" height="46"></div>
<div class="login_boder">
<form id="form">
    <div class="login_padding" id="login_model">
      <h2>登录名</h2>
      <label>
        <input type="text" name="username" class="txt_input txt_input2" placeholder="请输入登录名">
      </label>
      <h2>密码</h2>
      <label>
        <input type="password"  name="userpwd" class="txt_input" placeholder="请输入登录密码">
      </label>
      <div class="rem_sub">
          <span class="err"></span>
          <div class="rem_sub_l" style="float: right">
            <label>
                <br>
              <input type="button" class="sub_button" name="button" id="button" value="SIGN-IN" style="opacity: 0.7;">
            </label>
          </div>
    </div>
</form>
<!--login_padding  Sign up end-->
</div><!--login_boder end-->
</div><!--login_m end-->
<script>
    $(function() {
        $("#button").click(function () {
            $.ajax({
                url: "{:url('system/login')}",
                data: $("#form").serialize(),
                type: 'post',
                dataType: 'json',
                success: function (data) {
                    if (data.code == 1) {
                        window.location="{:url('index/index')}";
                    }else{
                        $(".err").show().html(data.msg);
                    }
                }
            })
        })
    })

</script>
</body>
</html>